<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><!DOCTYPE html>
        <html>
        <head>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>分类管理</title>
            <link rel="shortcut icon" href="favicon.ico">
            <link href="/Public/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
            <link href="/Public/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
            <link href="/Public/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
            <link href="/Public/Theme1/css/animate.min.css" rel="stylesheet">
            <link href="/Public/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">

        </head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>图片管理
                  
                    </h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                            <i class="fa fa-wrench"></i>
                        </a>

                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>

                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>图片链接</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($banner)): $i = 0; $__LIST__ = $banner;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$banner): $mod = ($i % 2 );++$i;?><tr>
                                    <td><?php echo ($banner["id"]); ?></td>
                                    <td><?php echo ($PATH); echo ($banner["url"]); ?></td>
                                    <td>
                                    <a onclick="delBanner(<?php echo ($banner['id']); ?>)" onclick="if(confirm('确定删除?')==false)return false;"><button class="btn btn-danger">删除</button></a>
                                    </td>
                                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/Public/Theme1/js/jquery.min.js?v=2.1.4"></script>
    <script src="/Public/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/Public/Theme1/js/content.min.js?v=1.0.0"></script>
    <script src="/Public/Theme1/js/plugins/iCheck/icheck.min.js"></script>
    <script src="/Public/layer/layer.js"></script>
    <script>
        function delBanner(id) {
            layer.alert('确定要删除吗?', {
                skin: 'layui-layer-molv' //样式类名  自定义样式
                ,closeBtn: 1    // 是否显示关闭按钮
                ,anim: 1 //动画类型
                ,btn: ['确认','取消'] //按钮
                ,icon: 6    // icon
                ,yes:function(){
                    window.location.href = "/index.php?s=/Admin/Banner/delBanner/id/" + id;
                }
                ,btn2:function(){
                }
            });
        }
    </script>
</body>
</html>
</title>
</head>
<body>

</body>
</html>